//
//  TaskRun.m
//  PerfectWorld
//
//  Created by dllo on 16/9/3.
//  Copyright © 2016年 LST. All rights reserved.
//

#import "TaskRun.h"
#import "ProjectState.h"
#import "Space.h"
@implementation TaskRun

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"projectState"]) {
        _projectState = [ProjectState modelWithDic:value];
    }
    if ([key isEqualToString:@"space"]) {
            NSMutableArray<Space *> *array = [NSMutableArray array];
            for (NSDictionary *dic in value) {
                Space * space = [Space modelWithDic:dic];
                [array addObject:space];
            }
            _space = array;
    }
}

@end
